﻿using System;

public partial class Modules_SearchTourControl : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            BindData();
        }
    }

    public void BindData()
    {
        BindDatatoDDL.BindTourDiemDen(ddlNoidi);
        BindDatatoDDL.BindTourDiemDen(ddlNoiden);
    }

    protected void Button1_OnClick(object sender, EventArgs e)
    {
        // get data
        var idNoidi = ddlNoidi.SelectedValue;
        var idNoiden = ddlNoiden.SelectedValue;
        var tbGia = tbGiatour.Text;

        // forward data
        Response.Redirect("~/danhsach-tour/" + idNoidi + "/" + idNoiden + "/" + tbGia);
    }
}